<?php

$term = get_term(CAT_SPECIAL_ID,'wpsc_product_category');
$sticky = get_option('sticky_posts');
$args = array(
    'post_type' => 'wpsc-product',
    'posts_per_page' => 4,
    'post__in' => $sticky,
    'wpsc_product_category' => $term->slug,
    'wpsc_product_category__in' => $term->term_id,
    'orderby' => 'date',
    'order' => 'DESC'
);
$special_products = new WP_Query($args);


?>

<div class="row show-grid" id="special_wrap">
    <div class="span9">
        <ul id="special" class="nav nav-tabs">
            <li class="active"><a href="#" data-toggle="tab"><?php _e('Special Selection', 'morebag') ?></a></li>
        </ul>
        <div class="tab-content custom-tab-content">
            <div class="tab-pane active" id="special_content">
                <ul class="item-special">
                    <?php
                        
                        while ($special_products->have_posts()) : $special_products->the_post();
                            global $wpsc_custom_meta, $wpsc_variations;
                            $wpsc_custom_meta = new wpsc_custom_meta(get_the_ID());
                            $wpsc_variations = new wpsc_variations(get_the_ID());
                            
                            ?>
                            <li class="item">
                                <div class="product">
                                <?php if(wpsc_show_thumbnails()) :?>
                                <a class="link-item" href="<?php echo get_permalink() ?>">
                                    <img class="product_image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php echo wpsc_the_product_title(); ?>" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo wpsc_the_product_thumbnail(); ?>"/>
                                </a>
                                <?php endif; ?>
                                    <h5 class="product-title"><a href="<?php echo get_permalink() ?>" class="name-item" ><?php the_title() ?></a></h5>
                                </div>
                            </li>
                            <?php

                        endwhile;
                    ?>
                </ul>
                <!-- <h3 class="readmore-product"><a href="">More products &raquo;</a></h3> -->
            </div>
        </div>
    </div>

</div><!-- #special_wrap -->

